
import com.tomasio.projects.lua.api.MainService;
import com.tomasio.projects.lua.model.User;
import java.util.List;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author usuario
 */
public class TestCore {

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("service-context.xml");

       
        MainService service = (MainService) context.getBean("mainService");
        
        User u = service.findUser("fernandofot");
        
//        Application a = service.findApplication("AVSEC");
//        a.setName("AVSECCC");
//               
//        service.updateApplication(a);
//        
        List<User> users = service.listUsers();
        for (User user : users) {
            System.out.println(user.getName());
        }

    }
}
